/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.domain.bo;

import com.comac.ins.common.core.validate.AddGroup;
import com.comac.ins.common.core.validate.EditGroup;
import com.comac.ins.common.mybatis.core.domain.BaseEntity;
import com.comac.ins.isfd.domain.IsfdMetadataManagementSheet;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 元数据管理-数据管理sheet业务对象 isfd_metadata_management_sheet
 *
 * @author Lion Li
 * @date 2024-09-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = IsfdMetadataManagementSheet.class, reverseConvertGenerate = false)
public class IsfdMetadataManagementSheetBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private String id;

    /**
     * 数据管理表id
     */
    @NotNull(message = "数据管理表id不能为空", groups = {AddGroup.class, EditGroup.class})
    private String metadataManagementId;

    /**
     * sheet
     */
    @NotBlank(message = "sheet不能为空", groups = {AddGroup.class, EditGroup.class})
    private String sheetName;

    /**
     * 文件根据sheet拆解后excel
     */
    @NotBlank(message = "文件根据sheet拆解后excel不能为空", groups = {AddGroup.class, EditGroup.class})
    private String sheetUrl;

    /**
     * 映射字段，JSONArray格式
     */
    @NotBlank(message = "映射字段，JSONArray格式不能为空", groups = {AddGroup.class, EditGroup.class})
    private String mapFields;

    /**
     * 表名
     */
    @NotBlank(message = "表名", groups = {AddGroup.class, EditGroup.class})
    private String tableName;

    /**
     * 入库总数数量
     */
    @NotBlank(message = "入库总数数量", groups = {AddGroup.class, EditGroup.class})
    private Long inventoryCount;
}
